{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><a href="{:url('auction/index')}"><strong>查看竞价拍卖信息</strong></a></li>
	</ol>
</div>
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('edit')}">
					<input type="hidden" name="id" value="{$ad.id}" />
					<div class="form-group">
						<label class="col-sm-3 control-label">标题：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="title" name="title" value="{$ad.title}"  class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">商品图：</label>
						<div class="input-group col-sm-4">
							<input type="hidden" id="thumb" name="thumb" value="{$ad.thumb}"/>
							<input id="upload" name="upload" type="file" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">市场价格：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="brief" name="brief" value="{$ad.market_price}"  class="form-control" />
						</div>
					</div>					
					<div class="form-group">
						<label class="col-sm-3 control-label">起拍价格：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="url" name="url" value="{$ad.pai_price}" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">竞价阶梯：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="brief" name="brief" value="{$ad.add_price}"  class="form-control" />
						</div>
					</div>					
					<div class="form-group">
						<label class="col-sm-3 control-label">保证金：</label>
						<div class="input-group col-sm-4">
							<input type="text" id="url" name="url" value="{$ad.deposit}" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">活动起止时间：</label>
						<div class="input-group col-sm-5">
							<input type="text" id="url" name="url" value="{$ad.start_time}"style="width: 200px;" class="form-control layer-date" />
							<input type="text" id="url" name="url" value="{$ad.end_time}" style="width: 200px;" class="form-control layer-date" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">拍卖商品详情：</label>
						<div class="input-group col-sm-6">
							<textarea id="content" name="content" style="height: 400px;">{$ad.content}</textarea>
						</div>
					</div>
					<div class="hr-line-dashed"></div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3">
							<a href="{:url('index')}" class="btn btn-danger"><i class="fa fa-arrow-left"></i> 返回 </a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__LIB__/ueditor/ueditor.all.js" type="text/javascript"></script>
<script>
	var ueditor = UE.getEditor('content');
	upload_one('{$ad.thumb}');
	$(function() {
		$("#myForm").validate({
			rules: {
				title: "required",
			},
			messages: {
				title: ICON.error + "请输入标题"
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}